package com.smart.enums;

public enum TypePlatEnum {
    MARKETING_COUPON("1","营销券"),
    SHOP_COUPON("2","商城券");

    private String code;
    private String name;
    TypePlatEnum(String code, String name){
        this.code = code;
        this.name = name;
    }

    public static String getName(String code){
        for (TypePlatEnum obj : TypePlatEnum.values()) {
            if(obj.getCode().equals(code)){
                return obj.getName();
            }
        }
        return "";
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }
}
